Data for detailed booking and booking transformed for forecast rows #579
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the forecast, everything is displayed per month, but the data is the same as staffing. While the forecast-data itself comes from the backend and will be transformed there, the data used for the infopills and the hovered state where we show which project the hours derive from must be transformed as well. We decided to do this in the frontend, and I have made a class dedicated to transforming the data, as well as a converter, converting week numbers into months, with data on the distribution of months if a week happens to be in two months.
I was hoping to be able to reuse some of the files that were used in staffing, but because of the weektypes used everywhere I had to create copys where there are not many differences, mostly the word week is replaced by the word month and the data is transformed as needed.
The data is still only testdata, and so the bookingmodel and detailedbooking does not necessarily correspond with each other, so the values do not make so much sense.